:root {
  --main-color: #ffffff;
  --second-color: #fafafa;
  --bar-color: #8dc26f;
  --main-text-color: #000000;
}

.settings {
  width: 100%;
  min-width: 280px;
  // padding: 20px 0px;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(to left, #76b852, #8dc26f);

  .settings-con {
    width: 60%;
    min-height: calc(100vh - 40px);
    box-sizing: border-box;
    margin: 20px auto;
    background-color: #ffffff;
    box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24);
    padding: 20px 50px;
    position: relative;

    @media screen and (max-width: 900px) {
      width: 100%;
      margin: 0;
    }

    @media screen and (max-width: 550px) {
      .edit-form {
        .edit-list {
          flex-direction: column-reverse;

          .info-input {
            .info-item {
              flex-direction: column;
              align-items: flex-start !important;

              input[type='text'],
              input[type='date'],
              textarea {
                width: 100%;
                flex: unset !important;
              }

              .info-item-label {
                margin-bottom: 20px;
              }
            }
          }
        }
        .save-btn-con {
          .save-btn {
            width: 100%;
          }
        }
      }
    }

    .back-btn {
      position: absolute;
      top: 20px;
      left: 10px;
      color: #1d2129;
      cursor: pointer;
      .iconfont {
        font-size: 20px;
      }
    }

    .settings-header {
      font-size: 20px;
      padding-bottom: 20px;
    }

    .edit-form {
      .edit-list {
        color: #333;
        display: flex;
        border-top: 2px solid #ccc;

        .info-input {
          flex: 2;

          input[type='text'],
          input[type='date'],
          textarea {
            color: #1d2129;
            font-size: 14px;
            background-color: #fafafa;
            outline: 0;
            border: 0;
            border: 1px solid #ddd;
            border-radius: 2px;
            padding-left: 12px;
            height: 28px;
            line-height: 28px;
            flex: 1;
            box-sizing: border-box;
          }

          input[type='text'] {
            padding-right: 32px;
          }

          textarea {
            padding: 10px 15px;
            height: 4em;
            min-height: 4em;
            line-height: 1.3em;
            resize: vertical;
          }

          input[type='radio'] {
            margin-left: 10px;
          }

          select {
            height: 25px;
          }

          .info-item {
            border-bottom: 1px solid #ccc;
            padding: 20px 0px;
            display: flex;
            align-items: center;

            .info-item-label {
              margin-right: 40px;
            }
          }

          .info-item:last-child {
            align-items: flex-start;
          }
        }

        .avatar-input {
          flex: 1;
          padding-top: 20px;
          display: flex;
          align-items: center;
          flex-direction: column;

          label {
            position: relative;
            display: block;
            width: 90px;
            height: 90px;
            border-radius: 50%;
            overflow: hidden;
            background-color: #666;

            img {
              width: 100%;
            }

            .avatar-mask {
              content: '';
              position: absolute;
              top: 0;
              left: 0;
              bottom: 0;
              right: 0;
              background-color: rgba(0, 0, 0, 0.24);
              border-radius: 50%;
              color: #ffffff;
              cursor: pointer;
              display: flex;
              flex-direction: column;
              justify-content: center;
              align-items: center;
              visibility: hidden;

              .iconfont {
                font-size: 18px;
                font-weight: lighter;
              }

              .click-text {
                margin-top: 5px;
                font-size: 12px;
              }
            }

            &:hover {
              .avatar-mask {
                visibility: visible;
              }
            }
          }

          input[type='file'] {
            display: none;
          }

          .avatar-text {
            margin-top: 5px;
            font-size: 14px;
            color: #1d2129;
          }
        }
      }

      .save-btn-con {
        width: 100%;
        text-align: center;

        .save-btn {
          font-size: 16px;
          margin-top: 40px;
          border: 0;
          outline: 0;
          background-color: var(--bar-color);
          color: #ffffff;
          padding: 5px 10px;
          cursor: pointer;
          position: relative;

          &:hover {
            &::after {
              content: '';
              position: absolute;
              top: 0;
              left: 0;
              width: 100%;
              height: 100%;
              background-color: rgba(255, 255, 255, 0.2);
            }
          }
        }

        @keyframes showSavedTip {
          0% {
            opacity: 1;
          }
          100% {
            opacity: 0;
          }
        }

        .saved-tip {
          margin-top: 5px;
          font-size: 14px;
          opacity: 0;
          // animation: name duration timing-function delay iteration-count direction fill-mode;
        }

        .show-saved-tip {
          animation: showSavedTip 2s linear 5s backwards;
        }
      }
    }
  }
}
